<template>
  <div>
  <hr>
  <hr>
  <hr>
  <Demo ref="demodemo">
  </Demo>
  <button @click="change1">点点获取内容</button>
  </div>
</template>

<script>
import Demo from './child/Demo'
export default {
  components:{
Demo
  },
methods: {
    change1(){
        console.log(this.$refs.demodemo);  
        this.$refs.demodemo.sayHi();
        console.log(this.$refs.demodemo.msg);
  
    }
},
}
</script>

<style>

</style>